-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dockerfiles with OMPython for OMSimulator CI on Jenkins #6
base: master
Are you sure you want to change the base?
Conversation
@sjoelund Where do we want to upload the images to? Should they be public or private? Also both Dockerfiles can probably be merged into one, but I'm not so sure how to do that. |
b84e610
to
4a4d55e
Compare
d87e8e3
to
19cf867
Compare
&& apt-get clean | ||
|
||
# Install OMC and OMPython | ||
RUN for deb in deb deb-src; do echo "$deb http://build.openmodelica.org/apt focal stable"; done | tee /etc/apt/sources.list.d/openmodelica.list \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should use a fixed version, like https://build.openmodelica.org/omc/builds/linux/releases/1.16.2/
But you could just use FROM openmodelica/openmodelica:v1.16.2-ompython
instead, right? And only install pandas to it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could do that. Where is the dockerfile for that one saved? I think we should have them all in one place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/OpenModelica/OpenModelicaDockerImages uses Docker Hub's settings to build from this repository's branches. It's pretty slow and error-prone though, and I want to eventually move it to Jenkins.
RUN groupadd -g 1000 testUser \ | ||
&& useradd -m -r -u 1000 -g testUser testUser | ||
|
||
USER testUser | ||
ENV USER=testUser |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Users belong in the docker command, not the image (in particular the id)
This PR is a bit stuck, but we should backup the Jenkinsfile that is currently running for the FMI-Cross-Checks for OMSimulator. I'm not sure how I need to change the Dockerfiles in this PR so it can be merged. @sjoelund Could you make some concrete suggestions? |
19cf867
to
7826f2b
Compare
It's not perfect, but I updated the Dockerfiles to not create a user group. We should merge this, as it now used by Jenkins for a long time and we need some back-up of the scripts. |
Why does it use 4 layers (run commands) in the dockerfiles. If you have too many layers you can get some warnings. |
7826f2b
to
3fbf376
Compare
It's faster to re-build when changing one of the later layers. But I changed it to be in (mostly) one layer. |
The Build tag should be changed to some different.
These docker images are used on Jenkins for FMI Cross Checks of OMSimulator. OMPython is used for verification, pandas and git used in the Python scripts to run the actual test.